Corrected the sed -i command in script/package shell script [#554]#672
Conversation
…, see comment by bazzaar]
|
Whilst I remember, and following on from the above PR, I think the creation of the kit subdirectory, in step 2 of the aforesaid workflow, isn't needed. Therefore in step 3, it's sufficient to un-tar the archive into test_site. Then the step 4 is to cd to test_site, and run the web server from that directory in step 5. As it is currently documented, I found that, contrary to the instruction in step 5, I had to cd into hope this helps |
|
@brntbeer I seem to remember you creating the packaging script - would you have time to review this PR? 👀 |
|
@bazzaar first off, welcome! thank you for this contribution. Sorry for the delay in looking into this, I'll take a look now ! 🎉 |
|
Brent,
Hi, thanks for reviewing the PR.
Firstly, in the regex :
\s* means zero or more spaces, you could replace it with ‘ *’ if your shell doesn’t recognise \s.
I preferred to anchor the regex on the literal ‘:’ character because it occurs after the keyword on every line in the config file. And just deleted everything after it.
But your change works equally well.
Did you see my comment in the PR about the possible redundant kit subdir?
bazzaar
|
Yep, you're right. I'm taking a look at that but would prefer to address that after this PR is merged if you dont mind. that way we can have these two changes be atomic |
Co-Authored-By: bazzaar <barryfoxbat@btinternet.com>
|
🎉 @bazzaar thank you much for this! |
Overview
In the training-kit README, a workflow is presented to create a local copy of the files to be served by a web-server. The first step of that workflow is to run
script/package, but that step fails ...This PR fixes two errors in the sed command inside script/package [ see comment by bazzaar in issue #554 ]
I subsequently ran through the corrected workflow on my local version of training-kit, and the web-served files are built and packaged successfully, and then display correctly in Firefox browser using the simple python web server.
Questions
As the sed regex didn't match the text in the
_config.yml, perhaps some change had been made to the_config.ymlfile previously, ... maybe the keywords are no longer as expected in that file? Just a thought ...hope this helps
bazzaar